package com.yanyilu.basing.controller;


import com.yanyilu.basing.common.R;
import com.yanyilu.basing.jwt.JwtIgnore;
import com.yanyilu.basing.service.IOpenidUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Sxx
 * @since 2020-10-26
 */
@CrossOrigin
@RestController
@RequestMapping("/openidUser")
public class OpenidUserController {
    @Autowired
    private IOpenidUserService openidUserService;

    /**
     * 注册
     * @param code
     * @return
     */
    @JwtIgnore
    @GetMapping("/getopenId")
    public R getOpenId(@RequestParam("code")String code){
        return openidUserService.getOpenId(code);
    }
}
